<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script>

        if ('EventSource' in window) {

            var url = "http://localhost:28080/basic01/sse/create?clientId=qwe";

            var source = new EventSource(url);

            source.onopen = function (event) {

                console.log("onopen...")
            };

            source.onmessage = function (event) {
                var data = event.data;

                console.log("onmessage..." + data);
            };

            source.onerror = function (event) {
                // handle error event
            };

        }
    </script>
</head>
<body>

</body>
</html>